<template>
    <li class="user" @click="userModel">
        登录/注册
    </li>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
interface pHandlerI{
    showUserModel:boolean;
}
export default defineComponent({
    data(){return {}},
    // emits:[''],
    methods: {
        userModel(event:MouseEvent) {
            console.log(123);
            console.log(this.$parent);
            // this.$parent.showUserModel=true
            (this.$parent as unknown as pHandlerI).showUserModel = true;
            //触发父级组件里面的自定义事件：结果父级组件里面压根没渲染这个组件
            // this.$emit("show-usermodel-event", { msg: 100 });
        }
    }
})
</script>
<style lang="scss" scoped>

</style>